<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="characterEncoding" value="UTF-8" scope="request" />
<jsp:include page="/WEB-INF/common/urls.jsp"/>
<html lang="zh-CN">
<head>
    <title>${applicationScope.PROJECT_NAME}-注册</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/lib/bootstrap-5.3.0-alpha1-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/global.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/authorization_style">
    <script src="${pageContext.request.contextPath}/lib/bootstrap-5.3.0-alpha1-dist/js/bootstrap.bundle.min.js"></script>
    <script src="${pageContext.request.contextPath}/lib/jquery-3.5.1.min.js"></script>
    <style>
        .container-div {
            display: grid;
            place-items: center;
            height: 100%;
            background: var(--bg);
            background-size: 120%;
        }
        .register-box {
            width: 100%;
            max-width: 400px;
            padding: 30px;
            background-color: #ffffff;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
            margin-top: -140px;
        }
        .form-register {
            width: 100%;
        }
    </style>
</head>
<script>
    $(() => {
    })
</script>
<body>
<div class="container-div">
    <div class="register-box">
        <main class="form-register">
            <form method="post" action="${publicUrl}/register" accept-charset="UTF-8">
                <h1 class="h3 mb-4 fw-normal text-center">${applicationScope.PROJECT_NAME}</h1>
                <h2 class="h4 mb-3 fw-normal text-center">用户注册</h2>

                <div class="form-floating mb-3">
                    <input name="username" type="text" class="form-control" id="username" placeholder="用户名" required>
                    <label for="username">用户名</label>
                </div>
                <div class="form-floating mb-3">
                    <input name="password" type="password" class="form-control" id="password" placeholder="密码" required>
                    <label for="password">密码</label>
                </div>
                <div class="form-floating mb-3">
                    <input name="phoneNumber" type="tel" class="form-control" id="phone" placeholder="手机号" required>
                    <label for="phone">手机号</label>
                </div>

                <div class="d-flex align-items-end">
                    <button class="btn btn-primary" type="submit">注册</button>
                    <a href="login" class="login-link">已有账号？立即登录</a>
                </div>
            </form>
        </main>
    </div>
    <jsp:include page="/footer" />
</div>
</body>
</html>
